/*
 * Copyright 2008 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.dopdf.document.model;

import org.dopdf.utils.Constants;

/**
 * The model class that holds information about a document.
 *
 * @author Deep Shah
 */
public class DocumentDetail {
    /** The document fetching strategy to use. */
    private Constants.PDFFetchingStrategy documentFetchingStrategy;

    /** The document id that is to be fetched */
    private String documentId;

    /**
     * The constructor that takes in the document id and document fetching strategy as argument.
     * @param documentId the document id.
     * @param documentFetchingStrategy the fetching strategy.
     */
    public DocumentDetail(final String documentId, final String documentFetchingStrategy) {
        this.documentId = documentId;
        this.documentFetchingStrategy = Constants.PDFFetchingStrategy.parse(documentFetchingStrategy);
    }

    /**
     * The getter for the Document fetching strategy.
     * @return the value held.
     */
    public Constants.PDFFetchingStrategy getDocumentFetchingStrategy() {
        return documentFetchingStrategy;
    }

    /**
     * Getter for the document id.
     * @return the value held.
     */
    public String getDocumentId() {
        return documentId;
    }
}
